export default [
  // user
  {
    path: '/user',
    component: '../layouts/UserLayout',
    routes: [
      { path: '/user', redirect: '/user/login' },
      { path: '/user/login', component: './User/Login' },
    ],
  },
  // app
  {
    path: '/',
    component: '../layouts/BasicLayout',
    Routes: ['src/pages/Authorized'],
    // authority: ['SysAdmin', 'SysOperator', 'SysSaler'],
    authority: ['SysAdmin', 'SysOperator', 'SysSaler'],
    routes: [
      // start
      { path: '/', redirect: '/account/center' },
      {
        path: '/Bill',
        name: 'Bill',
        icon: 'bold',
        authority: ['SysAdmin', 'SysOperator'],
        component: './Bill/BillList',
      },
      {
        path: '/Bill/:id',
        name: 'billDetail',
        component: './Bill/Framework',
        hideInMenu: true,
        routes: [
          {
            path: '/Bill/:id',
            name: 'Framework',
            redirect: '/Bill/:id/HBL',
          },
          {
            path: '/Bill/:id/mbl',
            name: 'MBL',
            component: './Bill/MBL',
          },
          {
            path: '/Bill/:id/hbl',
            name: 'HBL',
            component: './Bill/HBL',
          },
          {
            path: '/Bill/:id/INV',
            name: 'INV',
            component: './Bill/INV',
          },
        ],
      },
      {
        path: '/Receivable',
        name: 'Receivable',
        icon: 'gift',
        component: './Receivable',
      },
      {
        path: '/Payable',
        name: 'Payable',
        icon: 'book',
        component: './Receivable',
      },
      {
        path: '/ReceiveGroup',
        name: 'ReceiveGroup',
        authority: ['SysAdmin'],
        icon: 'gift',
        component: './ReceiveGroup',
      },
      {
        path: '/BoxCount',
        name: 'BoxCount',
        icon: 'book',
        component: './BoxCount',
      },
      {
        path: '/Profit',
        name: 'Profit',
        icon: 'wallet',
        // authority: ['SysAdmin'],
        component: './Profit',
      },
      {
        path: '/config',
        icon: 'table',
        name: 'config',
        authority: ['SysAdmin'],
        routes: [
          { path: '/config/BoxType', name: 'BoxType', component: './Config/BoxType', icon: 'table' },
          { path: '/config/Port', name: 'Port', component: './Config/Port', icon: 'table' },
          { path: '/config/Currency', name: 'Currency', component: './Config/Currency', icon: 'table' },
          { path: '/config/Pom', name: 'Pom', component: './Config/Pom', icon: 'table' },
          {
            path: '/config/InvItemCategory',
            name: 'InvItemCategory',
            component: './Config/InvItemCategory',
            icon: 'table',
          },
          { path: '/config/FaPiaoState', name: 'FaPiaoState', component: './Config/FaPiaoState', icon: 'table' },
          { path: '/config/TiDanState', name: 'TiDanState', component: './Config/TiDanState', icon: 'table' },
          { path: '/config/Relationer', name: 'Relationer', component: './Config/Relationer', icon: 'table' },
          { path: '/config/User', name: 'User', component: './Config/User', icon: 'table' },
          { path: '/config/Backup', name: 'Backup', component: './Config/Backup', icon: 'table' },
        ],
      },
      {
        name: 'exception',
        icon: 'warning',
        path: '/exception',
        hideInMenu: true,
        routes: [
          // exception
          {
            path: '/exception/403',
            name: 'not-permission',
            component: './Exception/403',
          },
          {
            path: '/exception/404',
            name: 'not-find',
            component: './Exception/404',
          },
          {
            path: '/exception/500',
            name: 'server-error',
            component: './Exception/500',
          },
          {
            path: '/exception/trigger',
            name: 'trigger',
            hideInMenu: true,
            component: './Exception/TriggerException',
          },
        ],
      },
      {
        name: 'account',
        icon: 'user',
        path: '/account',
        routes: [
          {
            path: '/account/center',
            name: 'center',
            component: './Account/Center/Center',
            routes: [
              {
                path: '/account/center',
                redirect: '/account/center/Bill',
              },
              {
                path: '/account/center/bill',
                component: './Account/Center/Bill',
              },
              {
                path: '/account/center/receivable',
                component: './Account/Center/Receivable',
              },
              {
                path: '/account/center/projects',
                component: './Account/Center/Projects',
              },
            ],
          },
          {
            path: '/account/settings',
            name: 'settings',
            component: './Account/Settings/Info',
            routes: [
              {
                path: '/account/settings',
                redirect: '/account/settings/base',
              },
              {
                path: '/account/settings/base',
                component: './Account/Settings/BaseView',
              },
              {
                path: '/account/settings/security',
                component: './Account/Settings/SecurityView',
              },
              {
                path: '/account/settings/binding',
                component: './Account/Settings/BindingView',
              },
              {
                path: '/account/settings/notification',
                component: './Account/Settings/NotificationView',
              },
            ],
          },
        ],
      },
      {
        component: '404',
      },
    ],
  },
];
